added check for top bin during data selection