fix remove function bug reported in #1
Merge pull request #4 from adammcarth/fix-remove-function

fix remove function bug reported in #1