Bugs small fixes for gps code