fixed bug in time filtering (works, tested)