add emitted cpointer check, fix tests