Fixed two bugs
forgot this
Merge pull request #370 from JFreegman/master

Fixed two bugs