fix javascript bug
fix some scripts