some javascript fixers