fix click do block with correct if/else statements