fix validation, error message does not get displayed yet