corrected error with checkState() and objects