Python indentation fixed thanks to Sam H.