fix for issue#12

I wrote a test that shows the breakage, then fixed it.

I *never* use coffeescript, so I might have done something wrong, but it was so simple maybe cargo cult programming worked this time?