Fixed the crash, plus some minor updates