Fixes issue 1136, issue 1106 git-svn-id: http://svn.dmdirc.com/trunk@3900 00569f92-eb28-0410-84fd-f71c24880f