Added fixes to media services tests (thanks @gtrifonov)