Applying @diggersworld's fix in e509099df63a893fdfd7af3b78e461fc77ca3689 to feature/bolt2