Fix debugmode