Fixed issues with nested object checking