Encapsulated boxpositionstate pushes into one if-case