Added fixes for category insert.