fix bottom calculation again