Fixed problems causing registration fails