use elseif
fix fourm errors under postgresql