OSD bugfix + added prefs and keys for debug mode