Fix problem with postgresql