fix errors and add check_ddos