some bugfixing. the click handler does not work properly