bugfixes for TYPE_PATH
added tests