Handling error with no history and setting labels