error messages appear in correct place