Fix for saving relations