your hex is compiled correctly, the problem lies in programing, try this for me please:
open the bootloader, click allow word config, and program the controller with "the works" or the all in one code.
then test the controller. all should work fine.
now, open bootloader, DO NOT CLICK ALLOW WORD PROGRAMING, load your custom hex, and program it.