Apply issue #146 to coffee code