Simpler error check