remove small bug in snapcontext