lock on shutdown, #110, but doesn't solve the problem of getting stop apps out.