Fixed problem with tests and debug mode