Fix SQL bugs with account bans