added code to prevent mass dump