bugfixes, preferences additions