Fix bug in the python template