Have you set the device configuration word (or 'fuse') to the appropriate value for the 20MHz osc?

Arch