Fix an issue with re-saving categories.. Fixes #122.