Removed some unnecessary error checking