Fixes Issue #59

This patch fixes Issue #59 for me. Could you please review it?