fixed z issues