improved click and flag behaviors