straightening out a couple of bugs

Sorry, that was probably my fault
Merge pull request #3 from nfriedly/patch-3

straightening out a couple of bugs