Export to old database style

Fixed a bug with the category selector