bug fixed for membership error