Fixing box implementations

From #4357.