#977 implement make-unsigned and fix build errors