small changes to improve rendering, bugfixes