GCC Support: Fixed errors due minmax and fixed warning about PyHandle templates.