Avoid referring to a variable before declaration