bug fixing flatchat