fixes issue with bgcolor being reset to white

in some cases (e.g. main timeline starts with empty frames), the background color was reset to solid white
fixes bad check for undefined
Merge pull request #531 from claus/fix-bgcolor

Fixes issue with bgcolor being reset to white