Removed extra safety check code to improve speed