-handle_cast({request_state, Requester}, State) ->
- ok = gen_server:cast(Requester, {response_state, State#state.cell_state}),
+%% If we receive 'state_broadcast' before we receive 'next_gen', throw it back
+%% in the queue. (Took me a while to realize this, but sometimes it is
+%% possible. The more there're cells, the more likely this is to happen.)
+handle_cast({state_broadcast, ReceivedGenID, _NeighborState}=Msg,
+ #state{gen_id=GenID, name=Name}=State) when GenID =/= ReceivedGenID->
+ ok = gen_server:cast(Name, Msg),