fixes #622
fixed a bug in create category