fix check security with javascript