Added error control