Changed for postgres compability