Fixed unstable javascript