Fix problem:
when undo a connection create action, null pointer exception will be
happened