fix not respecting length