Fix warning about cap_enter undefined