fix receiveData conditions