Fixed minor issues w.r.t. create and delete after moving stack lock to separate thread.