Fix the bad usage of for-in loop against array