Changed some error checking procedures