Add a condition to prevent removing existent detail object