Use pre-defined types and fix pthread bug