Converted indentation to spaces
Magic trick to prevent your ui thread to hang in some cases (modal windows while in background, ...)