fix all the bugs casued by redefining of usertype