preferences.dm and map bug fix