Added error detect