added limit checks in hza_enter()