osx build updates, correct typecast sizes and types, pilotedge connection bug fix