Bug fix when changing card background