Fixed javascript error