prevent invalid lengths to be queried