Fixes for App-crashing bugs

Fixes both bugs listed in issue #1.