fix bug in merge bins