fixed crash and title is set