Fixed Debug mode

I still don't know what the problem was, this is really really strange behavior! But it works now, at least.