fixed the `z-light-out-p' function