Fix for #1801 - fixing 404 on page view when using PostgreSQL

Following @ErisDS recommendation, adding fixBools method to convert
booleans to 1/0 to be consistent with mysql and sqllite3 data providers.