KRACOEUS-7196 fixing javascript bug

this fixes the open bug we had with the JS, now the medusa screen opens consistently each time.