fix bg repeat bug