Fixed random bugs.