Fixing SQL queries + PHP notices (old files)
Fixing a SQL query + fixing PHP notice and minor fix in the group topic layout