Fixed scene encoding/decoding issues introduced in last commit