Build-to-window fixes