Fixed an 8-space indent.
Reworked logic a bit. Should work the same way.
Merge branch 'master' into ospalh-special