Feature/fix timestamps

fixes for issues #586 and #591