Fixing query, fixing php warning
Adding stats icon.