Fix bug when entering very large z values.