fixed position issue with seekg