Fixes Issues #56 & #45

Unable to test on Nexus rooted at the moment, but I imagine that it no longer crashes, at least.