Fixed the error message appearing when there was no error