onResourceClicked bug fixed