Remove NullPointerException on cuboidevent