Fix JS error on item removed from dynamic forms