fix for logical min smaller than zero and more bytes than 1.