Fix private message error for JRuby.