fixed onclick query event