fix bug with new period