Fix receive_messages (TODO: update rspec)