Minor fixes added to input validation