Fixing calcZ...