Fixed work in debug mode