fix foreground error spam