fixed null bug with parser