Fixed Where acording to postgres