fix stupid bug in conversion code

..as i don't have a PinDMD to test directly
fix typo