Fixed more and more bugs.