Fixing sql bug in pvp