Fixed some js errors to do with stuff being null when project has just been created.