fix error check for binwidth definition