Minor fix: default pg port has been changed
Fix miscellaneous static analysis warnings