fixed result value printing in REPL and 'val' stores ConstantReference objects