Fixed postgres 9.1