[TIMOB-14978] Fixed a bunch of small bugs.