leading zero bug fix