fix issue with counting plots
Merge branch 'master' of https://github.com/digitalabs/IBPMiddleware