fixxed registration error handling