fixed error with assets resource. added tests