(supposed) improvements to dateline handling