Updated to correct invalid reference to non-initialized variable.