Bugfixes, done with Qi.