Fix: Several bugs.