bugfix for mock