fix nil references in flowing_logic.lua