fixed bug: if you select range and draw the rectangle after, the timestamps are correct