stability improvements for generated stub