My survey calculation outputs incorrect values?