better NPE protection
fixed gcm type
added location reporting