tsor prettification and critical bugfix