Added wait at the end.