Fixed errors in postgress.