security check
fix for #738