preventInvalidInput is correctly working again