binAverage() bugfix [issue 304]