fixing escape problem