nullp fix on removing elements from sliding window - will need to revisit this as nullp shouldn't have been possible