fix a small bug on type; history is now able to store the latest buff when you use direction keys