Added condition for register error as it is mandatory