various fixes, #1