Added callback when creating dynamic types