Fixed some problems in CategoryEntityManager.java