OChanged time-1 to time at get_perim_from_initial_tign
Corrected a bug