Fixing box implementations

From #4257.