Fixing the error displaying