User wont remove

Guys can you help me with this? I’m kinda confused why the user and cookies won’t automatically remove itself but the active removes after the time runs out. Thank you!

:local username $user;
:local date [/system clock get date];
:local time [/system clock get time];
:log warning “$username has login - $time”;
{
:if ([/system scheduler find name=$username]=“”)
do={
/ip hotspot user set [find name=$user] limit-uptime=1m
/system scheduler add name=$username interval=1m
on-event=“”
/ip hotspot active remove [find user=“$username”]\r\n
/ip hotspot cookie remove [find user=“$username”]\r\n
/ip hotspot user remove [find name=$username]\r\n
/system scheduler remove [find name=$username]“”
}
}