Fixed some issues discovered when building python API example program