Fixed the z command,

Still needs testing on other  machines