fix bgimage bug