Fixed a couple of bugs related to timestamps & out of array access