Remove onCOnnect and onError from options