Fixed referenced before assigned