Improve merlin support