solved spastic behavior
minor changes