Bug in user_stats queries