bug fix and bin rules