solved crash at starting time. There is still a crash at closing time.