fixed an error with leading zeros