LPS-44098 Revert changes of b839c5080d294e560a532c5987bb65aea2e87429 because it creates LPS-44312
LPS-44341 Fixing wrong window state, also fixing duplicate variable
LPS-44341 Better to hide first
LPS-44341 Missing semicolon
LPS-44341 Apply the same on the other similar staging screen + missing semicolons here as well
LPS-44341 Since order matters, add a line break