Fix process referenced before assignment