Fixed error in error reporting