Fixing same parent id issue