bugfix calculating correct limits
remove code