fixing bugs in SDMLibEmf, temprorily. Still codgen fixes to be done.