prevent multiply running variable select bug