Bug fix. Used uninitialized vars.