Fixed bug missing The "then" statemtent when adding to source file.