fix onclick behaviour