fix for 324
Merge pull request #335 from nikhan/fix#324

fix for #324