Minor bug fixes

> Fixed submit button not enabling when selecting a history item in the
input box;
> Fixed errors related to concatenation of non-strings due to capture of
arguments from the print functions.