Fix two possible crashers in the ProjectHandler