Fix use before assignment