Fix bug in python loader.