added setting dialog and small fix