register bugs fixed