fix rom-type bug