Fixed error: now storing correct value in DB value table