Fixes for Android GCM. Should also fix issue #8