Fix UI javascript