Couple of fixes, added max command history