Enabled debug and small fix