fixed AABB collision detection, no longer crashes program