fixed bug if a category dosen't exists