Fixed bug when align frames restarts