Fixes Issue #22 & #38