Correcting wrong cut for media_dir