Put in a check for bad resource

If creators id the end of the file, the system crashes.