Fixed many more bugs.