added reflection security checks