add protection against incorrect rebinning