Fixed crashes, bugs and other small stuff.