Resolved a typeerror with javascript.