Uncommented some more error checks.