Fixing a couple of bugs in the package