bounds and viewbox fixes merge from master