Fixed greater than z bug