Fixes for discustion bot. ? needs a bit of testing.