Applied fix from issue #12