bug in item click event handler