fixed nullpointerexception to do with media player