Don't try to access undefined memory when loading new punishments from DB

Has been leading to random people getting kicked if this ends up being a steam ID
Tidy up some SQL queries