sandbox state building test and bug fixes.