Fix the size if the input is invalid