LPS-38361 Fix several bugs related to staging