fix offset errors caused by windows line endings