Fix schema location writing