Fix oops in main() (assigning handles to ret bad!)