Removed incorrect error checking