small changes in emulate.h