do not close settings two times

Signed-off-by: Grarak <williye97@gmail.com>