various security fixes
small fixes