Fixed background refresh bug