Added wait-on-start functionality.