fixed bug on repeat (passing speed value)