Fixing up python wrapper casting.