minor fixes to timeframe code