Some further changes to input validation