Fixed osd creation

Now it works for me. Shouldn't break anything.