Fixing a bug that made the push registration happens on the incorrect
thread