fixed length constraints check to always result in correct range