fixed whiel loop
fixed whiel loop