Test and compilation breakage fixes