Unit tests and fixes for get_zone