fixed a pg bug in saimod api