Fixed error where error message would appear even if created