#470 repair nullpointer by reading the context before receiving the message