Tiny fix to event dispatch logic in the slam class.