Rgistration bug fixes