Fixed a couple bugs and a crash I discovered using the app.