Fixed javascript problem