The castle's design was further modified by King Stanisław II August, who in 1764 commissioned Jakub Fontana, Dominik Merlini, Jean-Baptiste Pillement and Efraim Schroeger to refurbish it. The eastern and western façades were made taller by the addition of a second floor, while the post-Gameren outbuildings were also rebuilt to the height of the main building, thus creating a large courtyard. About that time, the castle was also included in the so-called Stanislavian Axis, a line of parks and palaces planned in the southern outskirts of Warsaw much like the Saxon Axis in the city center. The palace's reconstruction was almost complete by 1784, when work was abandoned and the building donated to the Polish Army.