Made zeropadding auto-detected instead of fixed