[BUG] Various fixes.