Add a few security checks