fix insertProject function.