Two fixes preventing deference of NULL pointer when attempting to load corrupted module files.