Fix for bug in get_bounds