fixed onclick bug