Fix automatic media association (ref #20)