Fix embarassing python errors