Avoid always find object length
Declare object out side statment
Fixed wrong syntax