Remove useless foreach