fix failing tests and test doT templates