Fix for postgresql support