Changed error reporting to a more safer bet

Still some work to do on this one. This could be a safety flaw.