Fixed the construction logic.