Fixed variable not declared. Throws warning in dev mode.