sort out saving empty string IDs