fixed input validation
fixed more input validation :)