Introduced time delay for AfterbuildRestart. Small code fixes.