fix bugs on setImageRegistrationMode