fixed onclick condition