Fixed problem with error message showing when there wasn't one