Sleeping process before resizing, otherwise resize gets lost into the children process