GAndrew's fix
fix debugg mode