Fix gpx driver

Proposal to fix the issue #291