bugfixes to stopdetection and parsegpx