bugfix: set bins only if not None
make Python 2.7 requirement more explicit