Done changes to make the system work after chrash