Invalid thread access fixed which was caused by wrong display handling