Revert previous changes

Teajizzle's proposed fix doesn't quite compile. Reverting back to original.
Merge pull request #5 from drjawa/patch-2

Revert previous changes