prevent invalid zoom levels