Fixed PHP bugs
Working communtiy detection