fixing postgres db detection