fixing security check