Added error state
Added error state