build fix, and fix for printing emf models