possible z-order fix

beware of memory leak