Probably because your history data has insufficient granularity. Always inspect your data.

Post your code in its entirety and a sample history file.