fix recalculate_dimensions bug