bugfixes by cueie