Fixed history command bug