convert new period to int before writing to driver file, solves issue #38