fix null _closeDeferred promise when switching projects