libmid: minor fix