Fixed nan and denormalized num bug with bin numbers