js bug fix - morris is expecting an element unless wrapped in a try