fixing bugs with positioning elements from saved state