apply changes from master to v1.5.0

1.5.0 produce smaller output than 1.7.2