Fixed parsing bug that caused crashes