Fixed errors in clear protocol