Adjust z vector