Small bugfixes. Everyhting should be rendered smoothly now.