main: Fixed compilation errors related to the storage thread.