various bugfixes (merged from Twidere)