Fixing issues for video playing in the background