fix nullpointer on receive(). seems basic pass