fix to debug mode