z bug fixed