fix for pin ui freeze on foreground