Fix .emit() method