Fixing windowwithtimeorcount
Fixing Issue #283