bugfix with js and flash