TYPICAL ERROR When Laura had finished painting her mother left
CORRECTION When Laura had finished painting, her mother left.
EXPLANATION Notice that if a comma is not placed after 'painting', then the reader is tempted to misread the sentence (at least, at first glance) to mean that Laura was painting her mother. Thus, it is a good habit to place a comma after introductory adverbs, adverbial phrases and adverbial clauses as it avoids potential misunderstanding of where the adverbial constructions end.
Place the comma in the correct location.