Fixed bug in GPX writer.