Clean up valstack handling