Fix freeze issue and video alignment