workaround for delay on main thread