Fixed possible variables referenced before assign