added more abort checks