createBox method fix