fix bug in randomness of show gallery