small bug fix

Fixed a problem with cubes having no material on them