fixed Douman's shoddy code ;D