Small fix to headless mode
Merge pull request #23 from AlexanderDzhoganov/master

Small fix to headless mode