Fixed some crashes related to making cubes