Added method to stop layout calculations