Fixing bg bug