Minor change to modalFactory dismiss function