Fixed a couple of bugs; Fixes #84