Fixed issue #1 thanks to Hanmac on Freenode's #ruby