Fixed improper history loading, fixes #26