Fixed Issue #15

Also, fixed issues with the history.