bug fix and cube resizing