Always dynamically allocate the background so the cleanup function can clean it up properly. Fix for Issue #31.