Fix a bug of generating cubes.:wq