I had a similar problem with a 20MHz program and it turned out I was using the wrong fuse setting for the clock when burning the chip. I was setting it as XT but when I set it as HS all was good.

Just something else to try

Paul