Fix #274

Fix #274 and replace #310 
Is the string formatting something that the analysis object should generally be doing? I don't think it should be part of this PR but if others agree we should open a new issue.