minor changes to preferences sql