Fixed layout invariant bug etc.