Code works on boot loader but not when directly programmed

There is a BOOTRST fuse that tells it where to start executing. With no bootloader that needs to be the opposite value to if there is a bootloader.