fixed dynamic js after layout was added