fixed ROM logic bug