Add better handling for nonexisting timestamps