Fix mediahandler factory