fix a bug onReceive