check for core.gpsport nullpointer first