fixed javascript addition issues