fixed bug that stopped error messages