bugfix for mock under debug env