some bugfixes + moved size calculations from ChatAdaper to BS