Fix bugs with loading Rom file