z order bugfix