a couple of bug fixes

Hi, thanks for this role.  I fixed a couple of bugs that I noticed, please let me know if you have any questions.