a few security improvements