fixing invarient bug caused by random seed in spinner