Fixed checked referenced before assignment