Some bugs, compatibility fixes.