fix several bugs affecting price claculator and collateral modules

Signed-off-by: Roger Manich <roger.manich@gmail.com>