Correct opened/closed box flag
Correct buggy shape generation