Better error check.