fix for postgresql compatibility