Fixed a bug in simgic pval