Fix for user app flow interruption and code regeneration

Fix for user app flow interruption and code regeneration