do some fixes, added new functions for mplayer