fixed bug due to over complicated history