shape bound calculation fixed