added security leak check